﻿<%@ Page Title="" Language="C#" MasterPageFile="~/admins/AdminMaster.Master" AutoEventWireup="true"
    CodeFile="Product.aspx.cs" Inherits="admins_Product" %>

<%@ Register Assembly="CKFinder" Namespace="CKFinder" TagPrefix="CKFinder" %>
<%@ Register Assembly="CKEditor.NET" Namespace="CKEditor.NET" TagPrefix="CKEditor" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    </asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <asp:Label ID="lb_messenger" CssClass="lb_messenger" runat="server"></asp:Label>
    <div class="PageName">
        Quản trị TOUR</div>
    <asp:Panel ID="pnView" runat="server">
        <div id="search_block">
            Tên địa điểm:
            <asp:DropDownList ID="drop_danh_muc_san_pham" runat="server" AutoPostBack="true">
            </asp:DropDownList>
            Tên tour:
            <asp:TextBox ID="txtFilterName" runat="server" CssClass="text" Width="145px"></asp:TextBox>
           <%-- &nbsp;Mã tour:--%>
           <%-- <asp:TextBox ID="txtFilterCode" runat="server" CssClass="CheckBox"></asp:TextBox>--%>
            <asp:Button ID="Filter" runat="server" OnClick="Filter_Click" Text="Lọc" CssClass="filter" />
            <asp:Button ID="UnFilter" runat="server" OnClick="UnFilter_Click" Text="Bỏ lọc" /></div>
        <%--</div>--%>
        <div class="Control">
            <ul>
                <li>
                    <asp:LinkButton CssClass="vadd" ID="lbtAddT" runat="server" OnClick="AddButton_Click">Thêm mới</asp:LinkButton>
                </li>
                <li>
                    <asp:LinkButton CssClass="vdelete" ID="lbtDeleteT" runat="server" OnClientClick="javascript:return confirm('Bạn có muốn xóa?');"
                        OnClick="DeleteButton_Click">Xóa</asp:LinkButton>
                </li>
                <li>
                    <asp:LinkButton CssClass="uupdate" ID="lbtUpdateOrd" runat="server" OnClick="lbtUpdateOrd_Click">Cập nhật thứ tự</asp:LinkButton>
                </li>
                <li>
                    <asp:LinkButton CssClass="vrefresh" ID="lbtRefreshT" runat="server" OnClick="RefreshButton_Click">Làm mới</asp:LinkButton>
                </li>
                <li><a class="vback" href="javascript:void(0);" onclick="window.history.go(-1);">Trở
                    lại</a> </li>
            </ul>
        </div>
        <asp:DataGrid ID="grid_san_pham" runat="server" Width="100%" CssClass="TableView"
            AutoGenerateColumns="False" AllowPaging="True" PagerStyle-Mode="NumericPages"
            PagerStyle-HorizontalAlign="Center" AllowSorting="True" PageSize="20">
            <HeaderStyle CssClass="trHeader"></HeaderStyle>
            <ItemStyle CssClass="trOdd"></ItemStyle>
            <AlternatingItemStyle CssClass="trEven"></AlternatingItemStyle>
            <Columns>
                <asp:TemplateColumn ItemStyle-CssClass="tdCenter">
                    <HeaderTemplate>
                        <asp:CheckBox ID="chkSelectAll" runat="server" onClick="check_all(this);" AutoPostBack="False">
                        </asp:CheckBox>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <asp:CheckBox ID="chkSelect" runat="server"></asp:CheckBox>
                    </ItemTemplate>
                    <ItemStyle CssClass="tdCenter"></ItemStyle>
                </asp:TemplateColumn>
                <asp:BoundColumn DataField="Tour_id" HeaderText="Id" Visible="False" />
                <asp:BoundColumn DataField="Ten_tour" HeaderText="Active" Visible="False" />
                <asp:TemplateColumn ItemStyle-CssClass="Text">
                    <HeaderTemplate>
                        Tên tour
                        <asp:LinkButton CssClass="sortasc" ID="lbtascname" CommandName="ascname" runat="server"
                            ToolTip="Sắp xếp theo tên tăng dần">s</asp:LinkButton>
                        <asp:LinkButton CssClass="sortdesc" ID="lbtdescname" CommandName="descname" runat="server"
                            ToolTip="Sắp xếp theo tên giảm dần">s</asp:LinkButton>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <asp:Label ID="Label1" runat="server" Text='<%# Eval("ten_tour") %>'></asp:Label>
                    </ItemTemplate>
                    <ItemStyle CssClass="Text" />
                </asp:TemplateColumn>
                <asp:TemplateColumn ItemStyle-CssClass="Image">
                    <HeaderTemplate>
                        Hình ảnh</HeaderTemplate>
                    <ItemTemplate>
                        <script type="text/javascript">                            playfile('<%# "/images/"+Eval("anh_nho") %>', "95", "80", "false", "", "", "")</script>
                    </ItemTemplate>
                    <ItemStyle CssClass="Image" />
                </asp:TemplateColumn>
                <asp:TemplateColumn ItemStyle-CssClass="Activehead">
                    <HeaderTemplate>
                        Thứ tự
                        <asp:LinkButton CssClass="sortasc" ID="lbtascord" CommandName="ascord" runat="server"
                            ToolTip="Sắp xếp theo thứ tự tăng dần">s</asp:LinkButton>
                        <asp:LinkButton CssClass="sortdesc" ID="lbtdescord" CommandName="descord" runat="server"
                            ToolTip="Sắp xếp theo thứ tự giảm dần">s</asp:LinkButton>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <asp:TextBox ID="txtOrd" runat="server" Text='<%# Eval("vi_tri")%>' CssClass="text number"
                            Width="80px" Style="text-align: center"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="rfvOrdview" runat="server" ControlToValidate="txtOrd"
                            Display="Dynamic" ErrorMessage="*" SetFocusOnError="True"></asp:RequiredFieldValidator>
                    </ItemTemplate>
                    <ItemStyle CssClass="Activehead" />
                </asp:TemplateColumn>
                <asp:TemplateColumn ItemStyle-CssClass="Function">
                    <HeaderTemplate>
                        Chức năng</HeaderTemplate>
                    <ItemTemplate>
                        <asp:ImageButton ID="cmdEdit" runat="server" AlternateText="Sửa" CommandName="Edit"
                            CssClass="Edit" ToolTip="Sửa" ImageUrl="/App_Themes/Admin/images/edit.png" CommandArgument='<%# Eval("Tour_id")%>' />
                        <asp:ImageButton ID="cmdDelete" runat="server" AlternateText="Xóa" CommandName="Delete"
                            CssClass="Delete" ToolTip="Xóa" ImageUrl="/App_Themes/Admin/images/delete.png"
                            CommandArgument='<%# Eval("Tour_id")%>' OnClientClick="javascript:return confirm('Bạn có muốn xóa?');" />
                        <%--<asp:ImageButton ID="cmdActive" runat="server" AlternateText='<%%>' CommandName="Active" CssClass="Active" ToolTip='<%%>' ImageUrl='<%%>' CommandArgument='<%%>' />--%>
                    </ItemTemplate>
                    <ItemStyle CssClass="Function" />
                </asp:TemplateColumn>
            </Columns>
            <PagerStyle HorizontalAlign="Center" CssClass="Paging" NextPageText="Previous" PrevPageText="Next">
            </PagerStyle>
        </asp:DataGrid>
        <div class="Control">
            <ul>
                <li>
                    <asp:LinkButton CssClass="vadd" ID="lbtAddB" runat="server" OnClick="AddButton_Click">Thêm mới</asp:LinkButton>
                </li>
                <li>
                    <asp:LinkButton CssClass="vdelete" ID="lbtDeleteB" runat="server" OnClientClick="javascript:return confirm('Bạn có muốn xóa?');"
                        OnClick="DeleteButton_Click">Xóa</asp:LinkButton>
                </li>
                <li>
                    <asp:LinkButton CssClass="uupdate" ID="lbtUpdateOrdBottom" runat="server" OnClick="lbtUpdateOrdBottom_Click">Cập nhật thứ tự</asp:LinkButton>
                </li>
                <li>
                    <asp:LinkButton CssClass="vrefresh" ID="lbtRefreshB" runat="server" OnClick="RefreshButton_Click">Làm mới</asp:LinkButton>
                </li>
                <li><a class="vback" href="javascript:void(0);" onclick="window.history.go(-1);">Trở
                    lại</a> </li>
            </ul>
        </div>
    </asp:Panel>
    <asp:Panel ID="pnUpdate" runat="server" Visible="false">
        <table class="TableUpdate" border="1">
            <tr>
                <td class="Control" colspan="2">
                    <ul>
                        <li>
                            <asp:LinkButton CssClass="uupdate" ID="lbtUpdateT" runat="server" OnClick="Update_Click">Ghi lại</asp:LinkButton>
                        </li>
                        <li>
                            <asp:LinkButton CssClass="uback" ID="lbtBackT" runat="server" OnClick="Back_Click"
                                CausesValidation="False">Trở về</asp:LinkButton>
                        </li>
                    </ul>
                </td>
            </tr>
            <tr>
                <th>
                    <asp:Label ID="Label3" runat="server" Text="Danh mục sản phẩm:"></asp:Label>
                </th>
                <td>
                    <asp:DropDownList ID="drop_danh_muc" runat="server">
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <th>
                    <asp:Label ID="lblName" runat="server" Text="Tên tour:"></asp:Label>
                </th>
                <td>
                    <asp:TextBox ID="txt_ten_tour" runat="server" CssClass="text"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="rfvName" runat="server" ControlToValidate="txt_ten_tour"
                        Display="Dynamic" ErrorMessage="*" SetFocusOnError="True"></asp:RequiredFieldValidator>
                    <asp:HiddenField ID="txtId" runat="server" />
                </td>
            </tr>
            <tr>
                <th>
                    <asp:Label ID="Label2" runat="server" Text="Mã tour:"></asp:Label>
                </th>
                <td>
                    <asp:TextBox ID="txt_ma_tour" runat="server" CssClass="text"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <th>
                    <asp:Label ID="lblContent" runat="server" Text="Mô tả ngắn:"></asp:Label>
                </th>
                <td>
                    <CKEditor:CKEditorControl ID="cke_mo_ta_ngan" runat="server" ResizeMaxHeight="50"
                        ResizeMinHeight="50"> </CKEditor:CKEditorControl>
                </td>
            </tr>
            <tr>
                <th>
                    <asp:Label ID="Label4" runat="server" Text="Giá:"></asp:Label>
                </th>
                <td>
                    <asp:TextBox ID="txt_gia_thi_truong" Text="0" runat="server" DataType="integer"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <th>
                    <asp:Label ID="Label16" runat="server" Text="Khuyến Mại:"></asp:Label>
                </th>
                <td>
                    <asp:DropDownList ID="Drop_khuyen_mai" runat="server" AutoPostBack="true" OnSelectedIndexChanged="Drop_khuyen_mai_select">
                    </asp:DropDownList>

                </td>
            </tr>
            <tr>
                <th>
                    <asp:Label ID="Label5" runat="server" Text="Giá khuyến mãi:"></asp:Label>
                </th>
                <td>
                    <asp:TextBox ID="txt_gia_khuyen_mai" Text="" runat="server" DataType="integer"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <th>
                    <asp:Label ID="Label6" runat="server" Text="Tour bán chạy:"></asp:Label>
                </th>
                <td>
                    <asp:CheckBox ID="ck_tour_ban_chay" runat="server" />
                </td>
            </tr>
            <tr>
                <th>
                    <asp:Label ID="Label7" runat="server" Text="Tour nổi bật:"></asp:Label>
                </th>
                <td>
                    <asp:CheckBox ID="ck_tour_noi_bat" runat="server" />
                </td>
            </tr>
             <tr>
                <th>
                    <asp:Label ID="Label10" runat="server" Text="Số ngày:"></asp:Label>
                </th>
                <td>
                    <asp:TextBox ID="txt_so_ngay" Text="0" runat="server" DataType="integer"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <th>
                    <asp:Label ID="Label11" runat="server" Text="Số đêm:"></asp:Label>
                </th>
                <td>
                    <asp:TextBox ID="txt_so_dem" Text="0" runat="server" DataType="integer"></asp:TextBox>
                </td>
            </tr>
            
            <tr>
                <th>
                    <asp:Label ID="Label12" runat="server" Text="Số chỗ :"></asp:Label>
                </th>
                <td>
                    <asp:TextBox ID="txt_so_cho" Text="0" runat="server" DataType="integer"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <th>
                    <asp:Label ID="Label15" runat="server" Text="Số chỗ đã đặt :"></asp:Label>
                </th>
                <td>
                    <asp:TextBox ID="txt_so_cho_da_dat" Text="0" runat="server" DataType="integer"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <th>
                    <asp:Label ID="Label13" runat="server" Text="Ngày khởi hành:"></asp:Label>
                </th>
                <td>
                    <asp:TextBox ID="txt_ngay_khoi_hanh" runat="server" CssClass="text" Text="Liên Hệ"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <th>
                    <asp:Label ID="Label14" runat="server" Text="Ngày kết thúc:"></asp:Label>
                </th>
                <td>
                    <asp:TextBox ID="txt_ngay_ket_thuc" runat="server" CssClass="text" Text="Liên Hệ"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <th>
                    <asp:Label ID="lblImage" runat="server" Text="Hình ảnh to:"></asp:Label>
                </th>
                <td>
                    <script type="text/javascript">                        playfile('/images/<%=anh_nho %>', "95", "80", "false", "", "", "")</script>
                    <asp:FileUpload ID="file_anh_to" DataType="anh" runat="server" />(width:209px, height:165px)
                </td>
            </tr>
            <tr>
                <th>
                    <asp:Label ID="lblImage2" runat="server" Text="Hình ảnh nhỏ:"></asp:Label>
                </th>
                <td>
                    <script type="text/javascript">                        playfile('/images/<%=anh_to %>', "95", "80", "false", "", "", "")</script>
                    <asp:FileUpload ID="file_anh_nho" DataType="anh" runat="server" />(width:349px)
                </td>
            </tr>
            <tr>
                <th>
                    <asp:Label ID="Label9" runat="server" Text="Hình ảnh slide:"></asp:Label>
                </th>
                <td>
                    <script type="text/javascript">                        playfile('/img/<%=anh_slide %>', "95", "80", "false", "", "", "")</script>
                    <asp:FileUpload ID="file_slide" DataType="anh" runat="server" />(width:768px, height:270px)
                    Xoá slide:<asp:CheckBox ID="ck_slide" runat="server" />
                </td>
            </tr>
            <tr>
                <th>
                    <asp:Label ID="Label8" runat="server" Text="Vị trí"></asp:Label>
                </th>
                <td>
                    <asp:TextBox ID="txt_vi_tri" Text="1" runat="server" DataType="integer"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <th>
                    <asp:Label ID="lblTitle" runat="server" Text="Nội dung:"></asp:Label>
                </th>
                <td>
                    <CKEditor:CKEditorControl ID="cke_noi_dung" runat="server" ResizeMaxHeight="50" ResizeMinHeight="50"> </CKEditor:CKEditorControl>
              <%--   </asp:TextBox>--%>
                </td>
            </tr>
            <tr>
                <td class="Control" colspan="2">
                    <ul>
                        <li>
                            <asp:LinkButton CssClass="uupdate" ID="lbtUpdateB" runat="server" OnClick="Update_Click">Ghi lại</asp:LinkButton>
                        </li>
                        <li>
                            <asp:LinkButton CssClass="uback" ID="lbtBackB" runat="server" OnClick="Back_Click"
                                CausesValidation="False">Trở về</asp:LinkButton>
                        </li>
                    </ul>
                </td>
            </tr>
        </table>
    </asp:Panel>
</asp:Content>
